<template>
  <view class="content">
    <u-button @click="previewFile()">预览</u-button>
  </view>
</template>

<script>
export default {
  data() {
    return {
      fileurl: '',
      typeName:'',
      size:''
    };
  },
  onLoad(options) {
    this.fileurl = options.fileurl;
    this.typeName = options.typeName;
    this.size = Number(options.filesize);
  },
  onShow() {

  },
  methods: {

//文件预览
    previewFile() {
      let item  = {
        url:this.fileurl,
        name:this.typeName,
        size:this.size
      }
      this.$store.dispatch('yulan',item)
    }
  }

};
</script>

<style>
</style>
